<?php
/**
 * adminMenu
 * 操作员菜单类
 */
 
class adminMenu {
	
	/**
	 * getMenuList_1
	 * 取得一级菜单
	 */
	function getMenuList_1() {
		global $DB;
		return $DB->Execute("SELECT am_id, am_name, am_url, am_target, am_opened FROM AdminMenu WHERE am_parent='0' AND am_status='1' ORDER BY am_sort");	
	}

	/**
	 * getMenuList_2
	 * 取得二级菜单
	 * @param $parentid 所属一级菜单ID
	 */
	function getMenuList_2($parentid) {
		global $DB;
		return $DB->Execute("SELECT am_id, am_name, am_url, am_target, am_opened FROM AdminMenu WHERE am_parent='" .$parentid  ."' AND am_status='1' ORDER BY am_sort");
	}

	/**
	 * getMenuList_3
	 * 取得三级菜单
	 * @param $parentid 所属二级菜单ID
	 */
	function getMenuList_3($parentid) {
		global $DB;
		return $DB->Execute("SELECT am_id, am_name, am_url, am_target, am_opened FROM AdminMenu WHERE am_parent='" . $parentid . "' AND am_status='1' ORDER BY am_sort");
	}

}
?>